package ooday03.Animal01;

public class Test {

    public static void main(String[] args) {
        Fish[] fish = new Fish[3];
        fish[0] = new Fish("小红", 1, "红色");
        fish[1] = new Fish("小黑", 2, "黑色");
        fish[2] = new Fish("小白", 3, "白色");
        for (int i = 0; i < fish.length; i++) {
            System.out.println(fish[i].name);
            fish[i].swim();
        }
        Dog[] dogs = new Dog[2];
        dogs[0] = new Dog("大黄",2,"黄色");
        dogs[1] = new Dog("旺财",3,"黑色");
        for (int i = 0; i < dogs.length ; i++) {
            System.out.println(dogs[i].name+"是"+dogs[i].color+"的");
            dogs[i].eat();
        }
        Chick[] chicken = new Chick[1];
        chicken[0] = new Chick("坤坤",2,"黑白色");
        chicken[0].show();


    }
}
